#ifndef PIC16E_REG_H
#define PIC16E_REG_H

#include <iostream>

class regexManager {
	static regexManager* instance; 
	private:
    regexManager(){};
	int regexs[7] = {0, 0, 0, 0, 0, 0, 0};	
	public:
	/**
		-2 已分配，不需要重新分配
		-1 所有寄存器都被占用
	*/
	int assignRegex(int x);
	int findRegix(int x);
	int unAssignRegex(int x);
	static regexManager* getInstance(){
		return regexManager::instance;
	};
};



class DebugUtils{
	static DebugUtils* instance; 
	public:
	static DebugUtils* getInstance(){
		return DebugUtils::instance;
	}
	void printArray(int q[], int i, int j){
		for (int _i = i; _i < j; _i++){
			std::cout << q[_i] << "\t";
		} 
		std::cout << std::endl;
	}
};

#endif